Skip to content

Conversation

@Mathiyarasy
Copy link
Contributor

@Mathiyarasy Mathiyarasy commented Nov 12, 2025

Fixes: #1069

Issue summary:

This PR enhances the user experience by automatically defaulting the [--workspace-folder] parameter to the current working directory when it is not explicitly specified. The following DevContainer CLI commands will now use the current working directory as the default workspace folder if [--workspace-folder] is omitted:

  • devcontainer build
  • devcontainer up
  • devcontainer exec
  • devcontainer templates apply
  • devcontainer features resolve-dependencies
  • devcontainer upgrade
  • devcontainer outdated
  • devcontainer read-configuration
  • devcontainer run-user-commands

Test cases is implemented for all these commands

@Mathiyarasy Mathiyarasy marked this pull request as ready for review November 12, 2025 13:43
@Mathiyarasy Mathiyarasy requested a review from a team as a code owner November 12, 2025 13:43
@Mathiyarasy Mathiyarasy marked this pull request as draft November 17, 2025 09:51
@Mathiyarasy Mathiyarasy marked this pull request as ready for review November 24, 2025 08:36
@Mathiyarasy Mathiyarasy changed the title For Exec Defaults workspace folder to current directory if not specified DevContainer commands now default the workspace folder to the current directory if not specified. Nov 24, 2025
Copy link
Contributor

@chrmarti chrmarti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks! Left a few comments.

Co-authored-by: Josh Wiley <josh@cloudbend.dev>
chrmarti
chrmarti previously approved these changes Jan 21, 2026
Copy link
Contributor

@chrmarti chrmarti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks!

Copy link
Contributor

@abdurriq abdurriq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM apart from the test assertions which should not be in the try-catch blocks, else the tests will pass if the assertions are skipped due to something failing earlier in the try-catch block.

@abdurriq abdurriq enabled auto-merge January 21, 2026 14:40
@abdurriq abdurriq disabled auto-merge January 21, 2026 14:41
@abdurriq abdurriq enabled auto-merge January 21, 2026 14:41
@abdurriq abdurriq merged commit 8f16144 into devcontainers:main Jan 21, 2026
22 checks passed
@Mathiyarasy Mathiyarasy deleted the dev/Mathi/Issue1069 branch January 21, 2026 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make --workspace-folder default to "." (current directory)

4 participants